/* Copyright Rex All rights reserved. */
enyo.kind({
	name: "com.RexToy.tempView",
	kind: com.RexToy.abstractCvtView,
	components: [
		{kind: "BasicScroller", components: [
			{kind: "RowGroup", components: [				
				{name: "c", richContent: false, kind: "Input", onblur:"blur", components: [
							{className: "hint", content: $L("Celsius")}
						]},
				{name: "f", richContent: false, kind: "Input", onblur:"blur", components: [
							{className: "hint", content: $L("Fahrenheit")}
						]},
				{name: "k", richContent: false, kind: "Input", onblur:"blur", components: [
							{className: "hint", content: $L("Kelvin")}
						]}
			]}
		]}
      ],
	
	fomular: {
		"c->c": "c",
		"c->f": "c*9/5+32",
		"f->c": "(f*5-160)/9",
		"c->k": "c+273.15",
		"k->c": "k-273.15"
	},
	
	units: ["c","f","k"],
	baseUnit: "c",
	
	blur: function(sender)
	{
		if(this.isNumber(sender))
		{
			this.calc(sender.name, this.getNumber(sender));
		}
	}
});